package com.fumin.controller;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fumin.pojo.BusinessResponse;
import com.fumin.pojo.ProjectInform;
import com.fumin.pojo.Projects;
import com.fumin.service.ProjectInformService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * Created by Lingo on 2018/3/15.
 */
@Controller
public class ProjectInformController {
    @Resource
    ProjectInformService projectInformService;

    @RequestMapping(value = "/inform/project", method = RequestMethod.POST)
    @ResponseBody
    public Object cretaeProjectInform(@RequestBody @JsonFormat ProjectInform projectInform) {
        BusinessResponse businessResponse = new BusinessResponse();

        projectInformService.insertSelective(projectInform);
        Long pk = projectInform.getPk();
        businessResponse.setCode("0");
        businessResponse.setContent(projectInform);
        businessResponse.setMessage("success");
        return businessResponse;
    }

}
